<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: 10171225
  Date: 2016/2/22
  Time: 16:38
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<html>
<head>
    <base href="<%=basePath%>"/>
    <title>文章详细</title>
</head>
<body>
<div class="container">
    <div>
        <jsp:include page="head.jsp"/>
    </div>
    <div class="row">
        <div>
            <div class="col-xs-3 col-sm-3 col-md-3">
                ${user.userName}[楼主]
            </div>
            <div class="col-xs-9 col-sm-9 col-md-9">
                <h1>${article.title}</h1>
                ${article.content}
            </div>
        </div>
        <div>
            <c:forEach items="${commentLst}" var="comment" varStatus="vs">
                <div class="col-xs-3 col-sm-3 col-md-3">
                        ${comment.userName}
                </div>
                <div class="col-xs-9 col-sm-9 col-md-9">
                    <c:out value="${comment.content}"/>
                </div>
            </c:forEach>
        </div>
        <div>
            <div class="col-xs-3 col-sm-3 col-md-3">
                <c:out value="${sessionScope.get('userName')}"/>
            </div>
            <div class="col-xs-9 col-sm-9 col-md-9">
                <form method="post" action="article/comment">
                    <textarea name="commentContent"></textarea>
                    <input type="hidden" name="articleId" value="${article.id}"/>
                    <button name="submit"  type="submit">回复</button>
                </form>
            </div>
        </div>
    </div>
    <div>
        <br/><jsp:include page="footer.jsp"/><br/>
    </div>
</div>
</body>
</html>
